package com.cn.serviceIntface;

import com.cn.entity.NewsEntity;
import com.cn.utilOne.Expression;
import com.cn.utilOne.PageBean;

import java.sql.SQLException;
import java.util.List;

public interface NewsServiceIntface {
    List<NewsEntity> queryAll() throws ClassNotFoundException, SQLException, InstantiationException, IllegalAccessException;

    PageBean<NewsEntity> findByCriteria(List<Expression> expressionList, int pc) throws ClassNotFoundException, SQLException, InstantiationException, IllegalAccessException;

    NewsEntity queryById(NewsEntity newsEntity) throws ClassNotFoundException, SQLException, InstantiationException, IllegalAccessException;

    int addNews(NewsEntity newsEntity) throws SQLException, ClassNotFoundException;

    int updateNewsById(NewsEntity newsEntity);


    int cont(String sql);

    List<NewsEntity> findAll(int pc, int ps);

}
